from django.db import models


class UserInfo(models.Model):
	'''用户表'''
	username = models.CharField(max_length=32, unique=True)
	password = models.CharField(max_length=32)
	phone = models.BigIntegerField(null=True, unique=True)
	dep = models.ForeignKey(to="Department", on_delete=models.CASCADE)


class Department(models.Model):
	'''部门表'''
	name = models.CharField(max_length=32, unique=True)

